package com.wy.model;

import java.util.Date;

import org.nutz.dao.entity.annotation.Column;
import org.nutz.dao.entity.annotation.Id;
import org.nutz.dao.entity.annotation.Readonly;
import org.nutz.dao.entity.annotation.Table;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@Builder
@Table("ti_user")
public class User extends AbsModel<User> {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(hump = true)
	private Long userId;
	@Column(hump = true)
	private String username;
	@Column(hump = true)
	private String password;
	@Column(hump = true)
	private String realname;
	@Column(hump = true)
	private Integer age;
	@Column(hump = true)
	private Character sex;
	@Column(hump = true)
	private Date birthday;
	@Column(hump = true)
	private String address;
	@Column(hump = true)
	private String email;
	@Column(hump = true)
	private String idCard;
	@Column(hump = true)
	private String tel;
	@Column(hump = true)
	private Double salary;
	@Column(hump = true)
	private Integer state;
	@Readonly
	@Column(hump = true)
	private Date createtime;
	@Readonly
	@Column(hump = true)
	private Date updatetime;

	@Override
	public String toString() {
		return "User [userId=" + userId + ", username=" + username + ", password=" + password
				+ ", realname=" + realname + ", age=" + age + ", sex=" + sex + ", birthday="
				+ birthday + ", address=" + address + ", email=" + email + ", idCard=" + idCard
				+ ", telphone=" + tel + "]";
	}
}